﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NSCore
{

    /// <summary>
    /// 用于表示噪声级
    /// </summary>
    [Serializable]
    public class NoiseLevel
    {

        public enum BandMode
        {
            SingleBand,

            Spectrum
        }


        public NoiseLevel()
        {
            this._spectrumRate = new Dictionary<int, double>();

            this._spectrumRate.Add(63, 0);
            this._spectrumRate.Add(125, 0);
            this._spectrumRate.Add(250, 0);
            this._spectrumRate.Add(500, 0);
            this._spectrumRate.Add(1000, 0);
            this._spectrumRate.Add(2000, 0);
            this._spectrumRate.Add(4000, 0);
            this._spectrumRate.Add(8000, 0);


        }



        #region 频率设置


     


        BandMode _bandMode = BandMode.SingleBand;

        public BandMode BandMode1
        {
            get { return _bandMode; }
            set { _bandMode = value; }
        }





        double _singleBandRate = 500;


        /// <summary>
        /// 单频带所代表的频率
        /// </summary>
        public double SingleBandRate
        {
            get { return _singleBandRate; }
            set { _singleBandRate = value; }
        }



        Dictionary<int, double> _spectrumRate;

        /// <summary>
        /// 多频带分级的简单表示，以后可能更改
        /// </summary>
        public Dictionary<int, double> SpectrumRate
        {
            get { return _spectrumRate; }
            set { _spectrumRate = value; }
        }


        double _lw;

        /// <summary>
        /// 声源的倍频带声功率级
        /// </summary>
        public double Lw
        {
            get { return _lw; }
            set { _lw = value; }
        }


        double _lAw;

        /// <summary>
        /// A声功率级
        /// </summary>
        public double LAw
        {
            get { return _lAw; }
            set { _lAw = value; }
        }




        #endregion


    }
}
